package phone.qyg.com.qyg.model;

import android.os.Parcel;
import android.os.Parcelable;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

/**
 * 作者：lblbh on 2017/6/5 11:21
 * 邮箱：lanbuhan@163.com
 * 功能：搜索内容
 */
@Table(name = "finddata")
public class Find implements Parcelable {


    @Column(name = "id", isId = true)
    private int id;

    public Base base;
    //搜索内容
    @Column(name = "key")
    public String key;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Find() {
    }

    public Find(String key){
        this.key = key;
    }
    @SuppressWarnings("unchecked")
    public Find(Parcel in) {
        id = in.readInt();
        key = in.readString();
        base = in.readParcelable(Base.class.getClassLoader());
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(key);
        dest.writeParcelable(base,flags);

    }

    public static final Creator<Find> CREATOR = new Creator<Find>() {
        @Override
        public Find[] newArray(int size) {
            return new Find[size];
        }

        @Override
        public Find createFromParcel(Parcel in) {
            return new Find(in);
        }
    };

}
